<%--
  Created by IntelliJ IDEA.
  User: 86135
  Date: 2021/5/12
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>书籍入库</title>
    <%
        //获取项目的根路径
        String path = request.getContextPath();
        String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <script src="<%=basePath%>tushug/img/jquery-1.12.4.js"></script>
    <%--    <link rel="stylesheet" href="sweetalert.css">--%>
    <link  rel="stylesheet" type="text/css" href="<%=basePath%>/sweetalert.css">
    <%--    <script src="sweetalert-dev.js"></script>--%>
    <script type="text/javascript" src="<%=basePath%>/sweetalert-dev.js"></script>
    <style type="text/css">
        body{
            background-color: #eae9e9;
        }
        #divxx{
            margin-left:650px;
        }
        .submit{
            margin-left:20px;
            background-color: orangered;
            width: 100px;
            height: 50px;
            font-size: 20px;
            color: white;
        }
        input{
            line-height:20px;
            margin-top: 30px;
            text-align:center;
        }
        select{
            line-height:20px;
            margin-top: 30px;
            text-align:center;
        }
    </style>
</head>
<body>
<div id="divxx">
    <form action="<%=basePath%>LibaryServlet?tp=insert" method="post">
        书籍名称:<input type="text" name="bookName" required><br>
        书籍分类:<select name="type">
        <option value="1">网络小说</option>
        <option value="2">儿童益智</option>
        <option value="3">学习资料</option>
        <option value="4">经典名著</option>
    </select><br>
        书籍作者:<input name="author" type="text" required><br>
        书籍库存:<input type="text" name="sum" required><br>
        书籍价格:<input type="text" name="price" required><br>
        书籍来源:<input type="text" name="source" required><br>
        入库时间:<input type="text" name="jdate" required><br>
        <input type="submit" name="" class="submit" id="tij"><input type="reset" class="submit">
    </form>
</div>
</body>
<script>
    $(function (){
        // $("#tij").click(function (){
        //     swal({
        //             title: "确定添加吗？",
        //             text: "",
        //             type: "warning",
        //             showCancelButton: true,
        //             confirmButtonColor: "#DD6B55",
        //             confirmButtonText: "确定添加！",
        //             cancelButtonText: "取消添加！",
        //             closeOnConfirm: false,
        //             closeOnCancel: false
        //         },
        //         function(isConfirm){
        //             if (isConfirm) {
        //                 swal("添加成功", "书籍已添加成功",
        //                     "success");
        //             } else {
        //                 swal("取消添加", "书籍未添加)",
        //                     "error");
        //             }
        //         });
        // })
    })
</script>
</html>

